/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package vector;

/**
 *
 * @author Alex
 */
public class Ejer_18_tema4 {
   public static int[] generaVector18(int v[]){
      //vector 8 o 18.
        
        int w[]=new int[v.length];
        for(int i=0;i<v.length;i++)
        {
           if(i%2==0)
           {
               w[i]=v[i]+15;
           }
           else
           {
               w[i]=v[i];
           }
        }
        return w;
    
   }
    
    public static void main (String args[]){
        int p[]={7,56,89,23,58,9,99,23,44,22};
        
        int z[]=new int [10];
        
        z=vectores.generaVector18(p);
        //mostrar el array z
        
        for (int i = 0; i < z.length; i++) {
            System.out.println(z[i]+"");
            
        }
    }
}
